package com.hopes.bizz.risk.transfer.interceptor;

/**
 * @author lyb
 * @version 1.0
 * @description: 保存企业信息
 * @date 2024/2/1 19:22
 */
public class RiskCompanyHolder {

    private static final ThreadLocal<Long> THREAD_LOCAL_COMPANY = new ThreadLocal<>();

    public static void setCompanyId(Long companyId) {
        THREAD_LOCAL_COMPANY.set(companyId);
    }

    public static Long getCompanyId() {
        return THREAD_LOCAL_COMPANY.get();
    }

    public static void clear() {
        THREAD_LOCAL_COMPANY.remove();
    }
}
